﻿
@{
    Layout = null;
    var img_url = ViewBag.img_url;
}
@model app_consume_product_dto
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>商品详情</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="~/Content/css/base.css" />
    <link rel="stylesheet" href="~/Content/css/tuoken.css" />
    <link href="~/Content/css/swiper-4.2.2.min.css" rel="stylesheet" />
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="~/Content/js/base.js"></script>
    <script src="~/Content/js/swiper-4.2.2.min.js"></script>
    <link href="~/Content/js/layer/1.9.3/layui.css" rel="stylesheet" />
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
</head>

<body>
    <div class="for_record">
        <!-- 焦点图 -->
        <div class="commodit_carousel">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <a href="">
                            <img src="@(img_url+Model.img_url)" alt="@Model.title">
                        </a>
                    </div>

                </div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
        <!-- 详情 -->
        <div class="convert_details">
            <h2 class="title">
                @Model.title
            </h2>
            <p class="intro">@Model.detail</p>
            <div class="introred">
                <label>兑换红钻：</label>
                <em>@Model.red_drill</em>
            </div>
            @if (Model.status == 1) {
                <a href="/Consumption/ConfirmExchange?id=@Model.id" class="convert_btn">立即兑换</a>
            } else {
                <a href="javascript:void(0)" class="convert_btn"  style="background-image:none;background-color:#808080">@(Model.status == 4 ? "即将开始" : "已售罄")</a>
            }

        </div>
        <input type="hidden" value="@Model.id" name="id" id="productId" data-red="@Model.red_drill" />

    </div>
    <script type="text/javascript">

        var mySwiper = new Swiper('.swiper-container', {
            autoplay: {
                delay: 3000,
                disableOnInteraction: false
            },
            loop: true,
            pagination: {
                el: '.swiper-pagination',
            }

        })


    </script>
</body>

</html>
